using System.Collections.Generic;
using GameFramework;
using UnityEngine;

namespace StarForce
{
    /// <summary>
    /// 三消游戏 工具类
    /// </summary>
    public static class EliminateGameUtility
    {
        
        private static Dictionary<EliminateType, string> s_EliminateImgs= new Dictionary<EliminateType, string>()
        {
            {EliminateType.Red,"1"},
            {EliminateType.Green,"2"},
            {EliminateType.Blue,"3"},
            {EliminateType.Pink,"4"},
            {EliminateType.Yellow,"5"},
        };

        private static List<EliminateType> s_List =  new List<EliminateType>(){EliminateType.Red,EliminateType.Green,EliminateType.Blue,EliminateType.Pink,EliminateType.Yellow,};


        /// <summary>
        /// 获取一个随机的方块数据
        /// </summary>
        /// <param name="i"></param>
        /// <returns></returns>
        public static EliminateItemData GetRandomData(int i, bool isMove = false)
        {
            
            //todo 随机获取一个数据

            int index = Utility.Random.GetRandom(0, s_List.Count);

            EliminateItemData data = new EliminateItemData(i, s_List[index], s_EliminateImgs[s_List[index]],isMove);

            return data;
        }
    }
}